<#assign base=request.contextPath>
<!DOCTYPE html> 
<html>
	<head>
		<title>${title}</title>
		<meta charset="utf-8">
		<#include "common/reference.ftl" />
		<#include "common/ligerui.ftl" />
		<#include "common/am.reference.ftl" />
	</head>
	<body class="${configs["skinName"]}">
		<div class="page-content">
			<div class="row">
			<#if viewMode !="view">
			<#include "common/breadcrumb.ftl">
			</#if>
				<form id="form" role="form" class="form-horizontal" method="post" action="${base}/${form_action}">
					<div class="col-xs-12">
						<div class="widget-box">
							<div class="widget-body">
								<input type="hidden" name="id" id="id" value="${model.id}" <#if viewMode == "view">disabled</#if>>
								<#if viewMode == "view">
								<div class="widget-header widget-header-flat">
									<h5 class="lighter">
										${module}
									</h5>
								</div>
								<#else>
								<div class="alert alert-warning">
									<strong>提示!</strong>
									<strong style="color:#dd514c;">出现红框</strong>的表示不能为空
								</div>
								</#if>
                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        服务业务类型
                                    </label>
                                    <div class="col-sm-6">
                                        <select id="serviceId" name="serviceId" class="form-control" required data-placeholder="请选择服务业务类型" <#if viewMode == "view">disabled</#if>>
											<#if serviceConfig_list?exists && serviceConfig_list?size gt 0>
											<#list serviceConfig_list as item>
											<option value="${item.serviceId}"<#if model.serviceId == item.serviceId>selected</#if> >${item.serviceName}</option>
											</#list>
											</#if>
                                        </select>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-3 control-label no-padding-right">
                                        区域
                                    </label>
                                    <div class="col-sm-6">
                                        <input id="txtParentId" class="form-control" type="text" placeholder="请选择区域" value="" required  <#if viewMode == "view">disabled</#if> />
                                    </div>
                                </div>


								<div class="form-group">
									<label class="col-sm-3 control-label no-padding-right">
										是否启用
									</label>
									<div class="col-sm-6">
										<input class="ace ace-switch ace-switch-7" type="checkbox" name="enabled" <#if model == null || model.enabled>checked="checked"</#if> <#if viewMode == "view">disabled</#if>>
										<span class="lbl"></span>
									</div>
								</div>
								<#if viewMode != "view">
								<div class="clearfix form-actions">
									<div class="col-md-offset-3 col-md-9">
										<button id="btnSubmit" class="btn btn-info" type="submit">
											<i class="fa fa-check bigger-110"></i>
											提 交
										</button>
									</div>
								</div>
								</#if>
							</div>
						</div>
					</div>
				</form>
			</div>	
		</div>
        <script type="text/javascript">
            $(function(){
                var ligerComboBox = $('#txtParentId').ligerComboBox({
                    width:180,
                    selectBoxWidth: 200,
                    selectBoxHeight: 200,
                    initValue:'${model.areaId}',
                    valueField:'areaId',
                    valueFieldID:'areaId',
                    textField:'areaName',
                    treeLeafOnly:false,
                    isShowCheckBox:false,
                    tree:{
                        url:'${base}/${route}/getTreeList',
                        textFieldName:'areaName',
                        idFieldName:'areaId',
                        parentIDFieldName:'parentId',
                        checkbox:false
                    },
                    onSelected:function(value){
                        $('#parentId').val(value);
                        //$('#areaId').val(value);
                    }
                });
                $('#form').validator();
            })
        </script>
	</body>
</html>